/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.apli.haiam.ejb.entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author Informática
 */
@Entity
@Table(name = "hos_tipo_evolucion")
@NamedQueries({
    @NamedQuery(name = "HosTipoEvolucion.findAll", query = "SELECT h FROM HosTipoEvolucion h")})
public class HosTipoEvolucion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "hte_id")
    private Integer hteId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 64)
    @Column(name = "hte_nombre")
    private String hteNombre;
    @Basic(optional = false)
    @NotNull
    @Column(name = "hte_estado")
    private int hteEstado;
    @OneToMany(mappedBy = "hosTipoEvolucion", fetch = FetchType.LAZY)
    private List<HosEvolucionTipoevo> hosEvolucionTipoevoList;

    public HosTipoEvolucion() {
    }

    public HosTipoEvolucion(Integer hteId) {
        this.hteId = hteId;
    }

    public HosTipoEvolucion(Integer hteId, String hteNombre, int hteEstado) {
        this.hteId = hteId;
        this.hteNombre = hteNombre;
        this.hteEstado = hteEstado;
    }

    public Integer getHteId() {
        return hteId;
    }

    public void setHteId(Integer hteId) {
        this.hteId = hteId;
    }

    public String getHteNombre() {
        return hteNombre;
    }

    public void setHteNombre(String hteNombre) {
        this.hteNombre = hteNombre;
    }

    public int getHteEstado() {
        return hteEstado;
    }

    public void setHteEstado(int hteEstado) {
        this.hteEstado = hteEstado;
    }

    public List<HosEvolucionTipoevo> getHosEvolucionTipoevoList() {
        return hosEvolucionTipoevoList;
    }

    public void setHosEvolucionTipoevoList(List<HosEvolucionTipoevo> hosEvolucionTipoevoList) {
        this.hosEvolucionTipoevoList = hosEvolucionTipoevoList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (hteId != null ? hteId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HosTipoEvolucion)) {
            return false;
        }
        HosTipoEvolucion other = (HosTipoEvolucion) object;
        if ((this.hteId == null && other.hteId != null) || (this.hteId != null && !this.hteId.equals(other.hteId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.apli.haiam.ejb.entidades.HosTipoEvolucion[ hteId=" + hteId + " ]";
    }
    
}
